package model;


import model.common.Entity;

import java.util.List;

public class User extends Entity {
    /**
     * 用户角色 普通用户
     */
    public static final String NORMAL = "NORMAL";
    /**
     * 用户角色 管理员 商家
     */
    public static final String ADMIN = "ADMIN";

    private String username;

    private String password;

    private String phone;

    private List<Address> addresses;
    private Double balance;


    // 用户收货地址字符串 #分割
    private String addressIds;

    private String role = "NORMAL";


    private String email;


    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }


    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Double getBalance() {
        return balance;
    }

    public void setBalance(Double balance) {
        this.balance = balance;
    }

    public String getAddressIds() {
        return addressIds;
    }

    public void setAddressIds(String addressIds) {
        this.addressIds = addressIds;
    }


    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Override
    public String toString() {
        return "User{" + "username='" + username + '\'' + ", password='" + password + '\'' + ", phone='" + phone + '\'' + ", balance=" + balance + ", addressIds='" + addressIds + '\'' + ", role='" + role + '\'' + ", email='" + email + '\'' + '}';
    }

    public List<Address> getAddresses() {
        return addresses;
    }

    public void setAddresses(List<Address> addresses) {
        this.addresses = addresses;
    }
}
